package cn.lcfms.app.admin.controller;

import java.util.HashMap;
import java.util.List;
import net.sf.json.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import cn.lcfms.bin.App;
import cn.lcfms.bin.BaseService;

@Controller("admin.Common")
@RequestMapping("/admin/common")
public class CommonController extends AdminBaseController{
	@RequestMapping("areas")
	public String areas(int id){
		BaseService service=App.getService("areas");
		service.where("parent_id="+id);
		service.column("id","name");
		List<HashMap<String, Object>> list = service.selectList();
		JSONArray array=JSONArray.fromObject(list);
		return array.toString();
	}
}
